<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>卫星图</title>
    <style>
        html,
        body,
        #container {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
<div id="container"></div>
<script src="https://webapi.amap.com/loader.js"></script>
<script src="https://webapi.amap.com/maps?v=2.0&key=345b4b5593d2fa2707ce7fb6a539a569"></script>
<script>
    var map = new AMap.Map('container', {
        mapStyle: "amap://styles/macaron", //设置地图的显示样式
        center: [114.441862, 30.462086],
        layers: [new AMap.TileLayer.Satellite()],
        zoom: 16
    });

   function setLocation (lon, lat) {
        // 将坐标定位到对应的经纬度上
          var marker = new AMap.Marker({
            position: [lon, lat],
            title: '您所在的位置',
            map: map,
            icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
<!--            offset: new AMap.Pixel(-13, -30),-->
        });
        map.setZoomAndCenter(16, [lon, lat])
      }
</script>
</body>
</html>